home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
352_01
/
strpppad.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-28
|
448b
|
21 lines
// STRPPPAD.CPP - contains String::strpad()
// this is a 'slave routine' called by String::pad().
//
// routine pads string with extra blanks out to length set by n
//
#include <stdlib.h>
#include <string.h>
#include "dblib.h"
void String::strpad ( )
// pad string with blanks if needed.
{
int sn=n;
char *ss=s;
if ( ss==NULL ) return;
for ( int i=strlen(ss); i<sn; ++i ) ss[i] =' ';
} // end String::strpad()